#include<iostream>
using namespace std;

int main()
{
    int x,y;
    while(cin>>x>>y,x,y)
    {
        int minx=213,miny=213,maxx=-213,maxy=-213;
        if(x==0&&y==0) break;
        else
        {
            while(!(x==0&y==0))
            {
                if(minx>x) minx=x;
                if(miny>y) miny=y;
                if(maxx<x) maxx=x;
                if(maxy<y) maxy=y;
                cin>>x>>y;
            }
            cout<<minx<<" "<<miny<<" "<<maxx<<" "<<maxy<<endl;
        }
    }
    return 0;
}
